Skip to content

Use SHA-512 integrity in package locks - #14701

Open
Sean McManus (sean-mcmanus) wants to merge 4 commits into
mainfrom
seanmcm/devbox2-wsl/agent76/sha512-lock-integrity
Open

Use SHA-512 integrity in package locks#14701
Sean McManus (sean-mcmanus) wants to merge 4 commits into
mainfrom
seanmcm/devbox2-wsl/agent76/sha512-lock-integrity

Conversation

@sean-mcmanus

@sean-mcmanus Sean McManus (sean-mcmanus) commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrade dependency integrity from SHA-1-only values to SHA-512 across the Yarn and npm lockfiles. Add repository-wide validation and a byte-verifying npm lock updater, and make npm consumers use frozen installs so builds consume the reviewed dependency graph.

The updater fetches exact tarballs from the configured approved registry, verifies each existing SHA-1 value against the downloaded bytes, computes SHA-512 independently, and protects lockfile replacement against partial or concurrent writes.

Validation

  • Verified 617 unique npm tarballs and 932 Yarn entries against fetched package bytes
  • Exercised clean online and offline restores for all lockfiles
  • Confirmed corrupted npm and Yarn cache entries fail integrity validation
  • Added 31 focused lockfile/updater tests
  • Passed extension compile, ESLint, repository lock validation, updater idempotence, and git diff --check

This PR was investigated and created by GitHub Copilot in VS Code. Any message starting with ✨Copilot: was sent by GitHub Copilot.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Upgrades dependency integrity and enforces reproducible dependency installation.

Changes:

  • Migrates lockfile integrity values to SHA-512.
  • Adds lockfile validation, updater tooling, and tests.
  • Replaces mutable npm installs with npm ci.

Reviewed changes

Copilot reviewed 29 out of 34 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Themes/package-lock.json Migrates integrity hashes to SHA-512.
Extension/readme.developer.md Documents verified Yarn bootstrap.
Extension/package.json Adds lockfile scripts and bootstrap changes.
Extension/.yarn-bootstrap/package-lock.json Upgrades Yarn integrity to SHA-512.
Extension/.scripts/verifyYarnLock.test.mjs Tests lockfile integrity validation.
Extension/.scripts/verifyYarnLock.mjs Validates Yarn and npm lockfiles.
Extension/.scripts/updatePackageLockIntegrity.test.mjs Tests updater and atomic writes.
Extension/.scripts/updatePackageLockIntegrity.mjs Adds byte-verifying lockfile updater.
Extension/.scripts/subresourceIntegrity.mjs Parses and computes integrity values.
Extension/.scripts/packageLockFiles.mjs Discovers repository package locks.
Build/package/jobs_package_vsix.yml Uses frozen npm installation.
.github/workflows/question-closer.yml Uses npm ci.
.github/workflows/question-closer-debugger.yml Uses npm ci.
.github/workflows/more-info-needed-closer.yml Uses npm ci.
.github/workflows/more-info-needed-closer-debugger.yml Uses npm ci.
.github/workflows/locker.yml Uses npm ci.
.github/workflows/job-compile-and-test.yml Runs repository lock validation.
.github/workflows/investigate-costing-closer-debugger.yml Uses npm ci.
.github/workflows/investigate-closer-debugger.yml Uses npm ci.
.github/workflows/feature-request-reopener.yml Uses npm ci.
.github/workflows/feature-request-debugger.yml Uses npm ci.
.github/workflows/feature-request-closer-triage.yml Uses npm ci.
.github/workflows/feature-request-closer-no-milestone.yml Uses npm ci.
.github/workflows/external-closer-debugger.yml Uses npm ci.
.github/workflows/enhancement-reopener.yml Uses npm ci.
.github/workflows/enhancement-closer-triage.yml Uses npm ci.
.github/workflows/enhancement-closer-no-milestone.yml Uses npm ci.
.github/workflows/duplicate-closer.yml Uses npm ci.
.github/workflows/by-design-closer.yml Uses npm ci.
.github/workflows/by-design-closer-debugger.yml Uses npm ci.
.github/workflows/bug-debugger.yml Uses npm ci.
Files not reviewed (1)
  • Extension/.yarn-bootstrap/package-lock.json: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread Extension/.scripts/subresourceIntegrity.mjs Outdated
Comment thread Extension/.scripts/verifyYarnLock.mjs Outdated
Comment thread Extension/.scripts/verifyYarnLock.mjs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 29 out of 34 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • Extension/.yarn-bootstrap/package-lock.json: Generated file

Comment thread Extension/.scripts/packageLockFiles.mjs Outdated
Comment thread Extension/.scripts/packageLockFiles.mjs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 29 out of 34 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • Extension/.yarn-bootstrap/package-lock.json: Generated file

Comment thread Extension/.scripts/updatePackageLockIntegrity.mjs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 29 out of 34 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • Extension/.yarn-bootstrap/package-lock.json: Generated file

@sean-mcmanus
Sean McManus (sean-mcmanus) marked this pull request as ready for review August 22, 2026 00:22
@sean-mcmanus
Sean McManus (sean-mcmanus) requested a review from a team as a code owner August 22, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pull Request

Development

Successfully merging this pull request may close these issues.

2 participants